package com.klb.action.catalog;

import com.klb.service.catalog.impl.RegisterServiceCatalogImpl;
import com.opensymphony.xwork2.ActionSupport;

/**
 * Created by fujia on 2016/5/30.
 */
public class RegisterActionCatalog extends ActionSupport {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String username;
    private String telephone;
    private String password;
    private String passwordTrue;
    
    private RegisterServiceCatalogImpl registerServiceCatalog;

    

    public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}

	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public String getPasswordTrue() {
		return passwordTrue;
	}
	public void setPasswordTrue(String passwordTrue) {
		this.passwordTrue = passwordTrue;
	}


	public void setRegisterServiceCatalog(RegisterServiceCatalogImpl registerServiceCatalog) {
		this.registerServiceCatalog = registerServiceCatalog;
	}



	@Override
    public String execute() throws Exception {
        if (this.registerServiceCatalog.registerIsSuccess(this.username, this.telephone, this.password, this.passwordTrue))
            return SUCCESS;

        return INPUT;
    }
}
